package com.celer.util;

import com.apifan.common.random.RandomSource;
import com.apifan.common.random.source.AreaSource;
import com.apifan.common.random.source.FinancialSource;
import com.apifan.common.random.source.InternetSource;
import com.apifan.common.random.source.OtherSource;
import com.apifan.common.random.source.PersonInfoSource;
import org.apache.commons.lang3.RandomUtils;

public class RandomUtil {
    public static final OtherSource otherSource = RandomSource.otherSource();
    public static final AreaSource areaSource = RandomSource.areaSource();
    public static final FinancialSource financialSource = RandomSource.financialSource();
    public static final PersonInfoSource personInfoSource = RandomSource.personInfoSource();
    public static final InternetSource internetSource = RandomSource.internetSource();
    /**
     * 生成随机年龄 18-60
     *
     * @return 生成的年龄
     */
    public static int randomAge() {
        return RandomUtils.nextInt(18, 60);
    }
}
